// 导入两个页面
import Home from "../pages/Home";
import About from "../pages/About";
import Produce from "../pages/Produce";
import Admin from "../pages/admin/Admin"
// import Dash from '../pages/admin/Dash'
// import OrderList from  '../pages/admin/OrderList'
import lazyLoad from "../utils/lazyLoad";
import Private from "../pages/Private";

const baseRoutes = [
  {path:"",element:<Home></Home>},
  {path:"/about",element:<About></About>},
  {path:"/produce/:id",element:<Produce></Produce>},
  {path:"/admin/*",element:<Private><Admin></Admin></Private>,
     children:[
      {path:'',element:lazyLoad('/admin/Dash.js')},
      {path:'dash',element:lazyLoad('/admin/Dash.js')},
      {path:'orderlist',element:lazyLoad('/admin/OrderList.js')},
     ]
  }
]

export default baseRoutes